|
|
 |
|
|
|
|
' Get Value From Registry mstrKeyValue = GetSetting(mstrConfigName, _
mstrSection, _
mstrKeyName, _
strDefault)
KeyGet = mstrKeyValue
End Function |
|
|
|
|
|
|
|
|
Using the Registry Class to Save Data |
|
|
|
|
|
|
|
|
When you fill in the Key Value text box with a different value and then click the Save W/Class command button in the sample form, you save the data back to the Registry. The Click event for this command button instantiates an instance of the Registry class. Set the values from the text boxes and then invoke the KeySave() method to retrieve the data: |
|
|
|
 |
|
|
|
|
Private Sub cmdRegClassSet_Click()
Dim oReg As Registry
Set oReg = New Registry With oReg
.ConfigName = txtConfig
.Section = txtSection
.KeyName = txtKeyName
.KeyValue = Trim$(txtKeyValue) .KeySave End With
'***************************************
'* Alternate Method
'***************************************
'With oReg
' .KeySave txtKeyValue, _
' txtSection, _
' txtKeyName
'End With
Set oReg = Nothing
End Sub |
|
|
|
|
|